﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AgentManageSelect.aspx.cs"
    Inherits="Common_AgentManageSelect" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>选择流程</title>
    <link href="../StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" >
        function ckbAll_onclick(sender,evt){
            var o_tb=document.getElementById("dltFlow");
            if (o_tb!=null){
                var o_ckbs=document.getElementById("dltFlow").getElementsByTagName("input");
                for (var i=0;i<o_ckbs.length;i++){
                    if (o_ckbs[i].type=="checkbox"){
                        o_ckbs[i].checked=sender.checked;
                        ckbFlow_onclick(o_ckbs[i],null);
                    }                
                }
            }
        }
        
        function close_page(sender,evt){
            window.close();
            return false;
        }
        
        function ckbFlow_onclick(sender,evt){
            sender.parentNode.style.fontWeight=sender.checked?"bold":"";            
        }
        
        function refreshParentPage(){
            if (window.parent!=null)
            {
                self.opener.location.href=self.opener.location.href;
                window.close();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ObjectDataSource ID="FlowDes" runat="server" SelectMethod="GetFlowDes" TypeName="ObjectFunction">
            </asp:ObjectDataSource>
            
                <fieldset style="margin-bottom: 3px;height:300px;">
                    <legend>工作流程</legend>
                    <div style="overflow: auto;height:100%;"> 
                    <asp:DataList ID="dltFlow" runat="server" RepeatColumns="2"
                        RepeatDirection="Vertical" RepeatLayout="Table" OnItemDataBound="dltFlow_ItemDataBound">
                        <ItemStyle Width="250px" />
                        <ItemTemplate>
                            <asp:CheckBox ID="ckbFlow" runat="server" Text='<%# Bind("Des") %>' />
                        </ItemTemplate>
                    </asp:DataList>
                    </div>
                </fieldset>            
            <fieldset style="margin-bottom: 3px;">
                <asp:CheckBox ID="ckbAll" runat="server" Text="全选" />
            </fieldset>
            <div style="text-align:right;">
            <asp:ImageButton ID="ibtnOK" runat="server" ImageUrl="~/Image/UIPics/Apply2.png" OnClick="ibtnOK_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/Image/UIPics/Abort2.png" />
            <input type="hidden" id="htxtRole" runat="server" />
            <input type="hidden" id="htxtAgent" runat="server" />
            <input type="hidden" id="htxtSDate" runat="server" />
            <input type="hidden" id="htxtEDate" runat="server" />
            <input type="hidden" id="htxtParAgent" runat="server" />
            <input type="hidden" id="htxtRemark" runat="server" />
            </div>
        </div>
    </form>
</body>
</html>
